The online racing simulator
Searching in All forums
(70 results)
LFS Marius LFS
Demo licensed
Quote from heawy : its not code to be copied and pasted...

I know but i don't know why don't work :/
LFS Marius LFS
Demo licensed
Still waiting :|
LFS Marius LFS
Demo licensed
This code work for you ? In my insim nothing happens Fap
LFS Marius LFS
Demo licensed
Quote from Bose321 :Maybe you can try that.

What ?
LFS Marius LFS
Demo licensed
Oh yeah, i forgot that

foreach (CompCar car in MCI.Info)
{
Players NPL;
if (_players.TryGetValue(car.PLID, out NPL))
{
var pathx = car.X / 196608;
var pathy = car.Y / 196608;
var direction = car.Direction / 180;
}

foreach(clsConn Conn in Connections)
{
// Pit EXIT
if (pathx >= -27 && pathx <= -24 && pathy >= 65 && pathy <= 67)
{
if (Conn.ExitZone == 0)
{
if (direction > 330 || direction < 20)
{
MessageToAll(_players[car.PLID].PName + " was fined ^1€500 ^7for wrong exit");
Conn.Cash -= 500;
Conn.ExitZone = 1;
}
if (Conn.ExitZone == 1)
{
MessageToUCID(_players[car.PLID].UCID, " ^1!!! Next time you will be kicked ^1!!!");
}
}
else // (Conn.ExitZone == 2)
{
SpecID(_players[car.PLID].PName);
}
}
else
{
if (Conn.ExitZone == 1)
{
Conn.ExitZone = 0;
}
}
}
}

Help me please !
LFS Marius LFS
Demo licensed
Hello i have this code


foreach(clsConn Conn in Connections)
{
// Pit EXIT
if (pathx >= -27 && pathx <= -24 && pathy >= 65 && pathy <= 67)
{
if (Conn.ExitZone == 0)
{
if (direction > 330 || direction < 20)
{
MessageToAll(_players[car.PLID].PName + " was fined ^1€500 ^7for wrong exit");
Conn.Cash -= 500;
Conn.ExitZone = 1;
}
if (Conn.ExitZone == 1)
{
MessageToUCID(_players[car.PLID].UCID, " ^1!!! Next time you will be kicked ^1!!!");
}
}
else // (Conn.ExitZone == 2)
{
SpecID(_players[car.PLID].PName);
}
}
else
{
if (Conn.ExitZone == 1)
{
Conn.ExitZone = 0;
}
}
}

..well, the code works but no how i want. When i go to wrong exit insim send messages 3 times

"plyerName" was fined $800 for wrong exit
!!! Next time you will be kicked !!!
"plyerName" was fined $800 for wrong exit
!!! Next time you will be kicked !!!
"plyerName" was fined $800 for wrong exit
!!! Next time you will be kicked !!!

I will be happy if someone want to help me Smile

EDIT: insim send messages 3 times becuse on server is 2 conn + host
LFS Marius LFS
Demo licensed
Thank you for reply but i solved the problem Smile
LFS Marius LFS
Demo licensed
Nobody ? Confused
LFS Marius LFS
Demo licensed
Thank you!
LFS - Error
LFS Marius LFS
Demo licensed
Today when I opened my lfs I saw this error and lfs closed: http://postimg.org/image/vn7y8loml/
I can do something with that ?
LFS Marius LFS
Demo licensed
No problem Smile
LFS Marius LFS
Demo licensed
Try to delete from data/misc
LFS Marius LFS
Demo licensed
Hey i have a problem named "Insim don't update buttons"
I created a new button (clock) but when the time is changed insim don't update the clock in button
LFS Marius LFS
Demo licensed
The website is in Spanish.. I don't undetstand nothing :/
LFS Marius LFS
Demo licensed
Quote from xdapa :
DOWNLOAD:
http://www.2shared.com/file/LDYyhbir/XF_Interior1.html

I can't download this. Can you send me a .zip file to [email protected] ?
Please, i like this headlights very much (:
LFS Marius LFS
Demo licensed
Quote from MadCatX :
Read the section "Receiving Packets" in the tutorial.

This is the file name ?
LFS Marius LFS
Demo licensed
Now in LFS_External Intialise insim events are :
InSim.BTC_Received += new LFS_External.InSim.InSimInterface.BTC_EventHandler(BTC_ButtonClicked);

I need to know that for InSimDotNet
LFS Marius LFS
Demo licensed
Quote from Bose321 :I think it would be easier to wrap that in a function.


void CreateButton(string Text)
{
IS_BTN b = new IS_BTN { Text=Text };
inSim.Send(b);
}

So you just call 'CreateButton("My text here");' every time to create a button. But I assume you already knew that because you know how to code. Cool

You could expand this function with more parameters like left, top, height, width, etc.

I solved this.
LFS Marius LFS
Demo licensed
Quote from MadCatX :

IS_BTN b = new IS_BTN { /* Whatever button parameters you wish */ };
inSim.Send(b);


And if i want to create another button i need to write again IS_BTN ?

For example IS_BTN Button = new IS_BTN { /* */ };
insim.Send(Button);
LFS Marius LFS
Demo licensed
Ok finally i connected my insim to lfs and i saw the message "Hello, InSim!" Big grin
http://www.filedropper.com/lfs00000031

Now if i want to create a butoon what i need to do ?
LFS Marius LFS
Demo licensed
Quote from geekas :There are already a lot of documentation, like https://github.com/alexmcbride/insimdotnet/wiki/InSim or http://www.nudoq.org/#!/Projects/InSimDotNet . If you really know programming in C#, you will understand new library, because all code examples are explained.

I know how to code but this library is new for me and is hard to code now... I really need some examples, especially with insim loader
LFS Marius LFS
Demo licensed
I have problem with insim loader |:
LFS Marius LFS
Demo licensed
Quote from Bose321 :

First learn the basics of programming, and how to create a new project and a new class etc.

I know how to create a new project .. etc. but InSimDotNet it's more complicated than LFS_External :| :/ Fap
FGED GREDG RDFGDR GSFDG